package com.yizhuoyan.his.webapi.controller.pharmacyoperator.vo;

import com.yizhuoyan.his.entity.DocPrescriptionDetailEntity;
import lombok.Data;

@Data
public class DocPrescriptionDetailVo {
    private Long id;
    /**
     * 成药处方ID
     */
    private Long prescriptionId;
    /**
     * 药品ID
     */
    private Long drugsId;
    /**
     * 用法
     */
    private String usageWay;
    /**
     * 用量
     */
    private String dosage;
    /**
     * 频次
     */
    private String frequency;
    /**
     * 数量
     */
    private Double amount;
    /**
     * 状态
     */
    private Integer state;
    public  static DocPrescriptionDetailVo of(DocPrescriptionDetailEntity entity) {
        DocPrescriptionDetailVo vo = new DocPrescriptionDetailVo();
        vo.setId(entity.getId());
        vo.setPrescriptionId(entity.getPrescriptionId());
        vo.setDrugsId(entity.getDrugsId());
        vo.setUsageWay(entity.getUsageWay());
        vo.setDosage(entity.getDosage());
        vo.setFrequency(entity.getFrequency());
        vo.setAmount(entity.getAmount());
        vo.setState(entity.getState());
        return vo;
    }
}
